<?php
/**
 * Created by PhpStorm.
 * DateTime: 2020/11/13 17:43
 * Intro:
 */

namespace addons\podunk\controller;


class Task extends Base
{
    protected $noNeedLogin = [];
    protected $noNeedRight = '*';

    public function _initialize()
    {
        return parent::_initialize();
    }

    public function getList(){
        $search = $this->request->get('search');
        $app = $this->request->get('app');

        $this->success('任务列表', \addons\podunk\model\Task::getTaskList($app, $search));
    }

    public function getTaskById(){
        $id = $this->request->get('id');
        $task = \addons\podunk\model\Task::get($id);
        if($task){
            $this->success('任务详情',$task);
        }else{
            $this->error('没有日志');
        }

    }
}